import request from '@/utils/requestManage.js'
//登陆
export function login(data) {
  return request({
    url: `/v3/virtualSystem/web/newLogin?username=${data.username}&password=${data.password}`,
    method: 'POST'
  })
}
//获取顶级组织
export function getTopOrganization() {
  return request({
    url: '/v3/virtualSystem/queryTopOrganization',
    method: 'GET'
  })
}

export function getUserMenuByFarmingType() {
  return request({
    url: '/v3/authority/v1/menu/getUserMenuByFarmingType',
    method: 'GET'
  })
}

export function getRoleFunctionAll(menuNo) {
  return request({
    url: `/v3/authority/v1/function/getRoleFunctionAll?virtualSystemNo=${sessionStorage.virtualSystemNo||'NYGL'}&menuNo=${menuNo}&organizationNo=${sessionStorage.organizationNo}`,
    method: 'GET'
  })
}

